#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0;
	char arr[10] = { 0 };
	scanf("%d", &n);
	int i = 0;
	for (i = 0; n>0; i++)
	{
		arr[i] = n % 10 + '0';
		n = n / 10;
	}
	int j = 0;
	for (j = 0; j < i-1; j++)
	{
		char tmp;
		tmp = arr[i - 1];
		arr[i - 1] = arr[j];
		arr[j] = tmp;
		i--;
	}
	printf("%s", arr);


	return 0;
}